##Install Packages if Needed
if (!require("ggplot2")) install.packages("ggplot2")
if (!require("cowplot")) install.packages("cowplot")
if (!require("Rmisc")) install.packages("Rmisc")
if (!require("lme4")) install.packages("lme4")
Loading required package: lme4
Loading required package: Matrix
if (!require("vegan")) install.packages("vegan")
if (!require("corrplot")) install.packages("corrplot")
if (!require("DHARMa")) install.packages("DHARMa")
Loading required package: DHARMa
This is DHARMa 0.4.6. For overview type '?DHARMa'. For recent changes, type news(package = 'DHARMa')
if (!require("effectsize")) install.packages("effectsize")
Loading required package: effectsize
if (!require("emmeans")) install.packages("emmeans")
Loading required package: emmeans
##Load Packages
library(ggplot2) #Required for ggplots
library(cowplot) #Required for plotting panel figures
library(Rmisc) #Required for SummarySE function
library(lme4) #Required for mixed effects modeling
library(vegan) #Required for multivariate analysis PERM
library(corrplot) #Required for correlation plot
#library(lmerTest)
library(DHARMa) #Required to check residuals of mixed effects models
library(effectsize) #Required for eta_squared effect sizes
library(emmeans) #Required for pairwise comparisons
#Note: Run "Graphing Parameters" section from 01_ExperimentalSetup.Rmd file
##Load Data
#Note: Physiological metrics calculated in 02_PhysiologyMetrics.R file
Coral<-read.csv("Outputs/CoralData.csv", header=TRUE)
##Set factor variables
Coral$TimeP<-factor(Coral$TimeP, levels=c("TP1", "TP2", "TP3", "TP4"))
Coral$Site<-factor(Coral$Site, levels=c("KL", "SS"))
Coral$Genotype<-factor(Coral$Genotype, levels=c("AC8", "AC10", "AC12"))
Coral$Orig<-factor(Coral$Orig, levels=c("N", "T"))
Coral$Origin<-factor(Coral$Origin, levels=c("Native", "Transplant"))
Coral$Site.Orig<-factor(Coral$Site.Orig, levels=c("KL.N", "KL.T", "SS.N", "SS.T"))
#' Calculate (partial) Omega-squared (effect-size calculation) for PERMANOVA and add it to the input object
#'
#' @param adonisOutput An adonis object
#' @param partial Should partial omega-squared be calculated (sample size adjusted). Default TRUE
#' @return Original adonis object with the (partial) Omega-squared values added
#' @import vegan
#' @export
adonis_OmegaSq <- function(adonisOutput, partial = TRUE){
if(!(is(adonisOutput, "adonis") || is(adonisOutput, "anova.cca")))
stop("Input should be an adonis object")
if (is(adonisOutput, "anova.cca")) {
aov_tab <- adonisOutput
aov_tab$MeanSqs <- aov_tab$SumOfSqs / aov_tab$Df
aov_tab$MeanSqs[length(aov_tab$Df)] <- NA
} else {
aov_tab <- adonisOutput$aov.tab
}
heading <- attr(aov_tab, "heading")
MS_res <- aov_tab[pmatch("Residual", rownames(aov_tab)), "MeanSqs"]
SS_tot <- aov_tab[rownames(aov_tab) == "Total", "SumsOfSqs"]
N <- aov_tab[rownames(aov_tab) == "Total", "Df"] + 1
if(partial){
omega <- apply(aov_tab, 1, function(x) (x["Df"]*(x["MeanSqs"]-MS_res))/(x["Df"]*x["MeanSqs"]+(N-x["Df"])*MS_res))
aov_tab$parOmegaSq <- c(omega[1:(length(omega)-2)], NA, NA)
} else {
omega <- apply(aov_tab, 1, function(x) (x["SumsOfSqs"]-x["Df"]*MS_res)/(SS_tot+MS_res))
aov_tab$OmegaSq <- c(omega[1:(length(omega)-2)], NA, NA)
}
if (is(adonisOutput, "adonis"))
cn_order <- c("Df", "SumsOfSqs", "MeanSqs", "F.Model", "R2",
if (partial) "parOmegaSq" else "OmegaSq", "Pr(>F)")
else
cn_order <- c("Df", "SumOfSqs", "F", if (partial) "parOmegaSq" else "OmegaSq",
"Pr(>F)")
aov_tab <- aov_tab[, cn_order]
attr(aov_tab, "names") <- cn_order
attr(aov_tab, "heading") <- heading
if (is(adonisOutput, "adonis"))
adonisOutput$aov.tab <- aov_tab
else
adonisOutput <- aov_tab
return(adonisOutput)
}
##Remove NA's
names(Coral)
[1] "ID" "RandN" "TimeP" "Site"
[5] "Genotype" "Orig" "Origin" "Set"
[9] "Site.Orig" "SA_cm2" "TP_ug.cm2_C" "TP_ug.cm2_S"
[13] "AFDW_mg.cm2_C" "AFDW_mg.cm2_S" "AFDW_mg.cm2_S.C" "Chl_ug.cm2"
Coral.rm<-na.omit(Coral)
##Log +1 transform
Coral.log<-Coral.rm
Coral.log[,-c(1:10)]<-log(Coral.rm[,-c(1:10)]+1)
Phys.cor<-rcorr(as.matrix(Coral.log[,-c(1:10)]), type="pearson")
Phys.cor
TP_ug.cm2_C TP_ug.cm2_S AFDW_mg.cm2_C AFDW_mg.cm2_S AFDW_mg.cm2_S.C
TP_ug.cm2_C 1.00 0.56 0.55 0.48 0.03
TP_ug.cm2_S 0.56 1.00 0.37 0.41 0.08
AFDW_mg.cm2_C 0.55 0.37 1.00 0.37 -0.49
AFDW_mg.cm2_S 0.48 0.41 0.37 1.00 0.60
AFDW_mg.cm2_S.C 0.03 0.08 -0.49 0.60 1.00
Chl_ug.cm2 0.37 0.16 0.33 0.50 0.20
Chl_ug.cm2
TP_ug.cm2_C 0.37
TP_ug.cm2_S 0.16
AFDW_mg.cm2_C 0.33
AFDW_mg.cm2_S 0.50
AFDW_mg.cm2_S.C 0.20
Chl_ug.cm2 1.00
n= 190
P
TP_ug.cm2_C TP_ug.cm2_S AFDW_mg.cm2_C AFDW_mg.cm2_S AFDW_mg.cm2_S.C
TP_ug.cm2_C 0.0000 0.0000 0.0000 0.6401
TP_ug.cm2_S 0.0000 0.0000 0.0000 0.2762
AFDW_mg.cm2_C 0.0000 0.0000 0.0000 0.0000
AFDW_mg.cm2_S 0.0000 0.0000 0.0000 0.0000
AFDW_mg.cm2_S.C 0.6401 0.2762 0.0000 0.0000
Chl_ug.cm2 0.0000 0.0248 0.0000 0.0000 0.0049
Chl_ug.cm2
TP_ug.cm2_C 0.0000
TP_ug.cm2_S 0.0248
AFDW_mg.cm2_C 0.0000
AFDW_mg.cm2_S 0.0000
AFDW_mg.cm2_S.C 0.0049
Chl_ug.cm2
diag(Phys.cor$P)<-0
corrplot(Phys.cor$r, type="upper", order="hclust",
p.mat = Phys.cor$P, sig.level = 0.01, insig = "blank")
##Subset Timepoint 1
Coral.log_TP1<-subset(Coral.log, TimeP=="TP1")
##PERMANOVA
Coral.TP1.perm<-adonis2(vegdist(Coral.log_TP1[,c(11:14, 16)], "euclidean")~ Coral.log_TP1$Origin * Coral.log_TP1$Site, data=Coral.log_TP1, strata=Coral.log_TP1$Genotype, method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP1.perm)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP1[, c(11:14, 16)], "euclidean") ~ Coral.log_TP1$Origin * Coral.log_TP1$Site, data = Coral.log_TP1, method = "euclidean", strata = Coral.log_TP1$Genotype)
Df SumOfSqs F parOmegaSq Pr(>F)
Coral.log_TP1$Origin 1 0.2789 2.7121 0.034440 0.012 *
Coral.log_TP1$Site 1 0.3722 3.6196 0.051750 0.003 **
Coral.log_TP1$Origin:Coral.log_TP1$Site 1 0.3433 3.3384 0.046454 0.004 **
Residual 44 4.5240
Total 47 5.5183
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP1[,c(11:14, 16)], "euclidean"), Coral.log_TP1$Origin))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.01547 0.015468 1.0199 0.3178
Residuals 46 0.69768 0.015167
##Check dispersion by Site
anova(betadisper(vegdist(Coral.log_TP1[,c(11:14, 16)], "euclidean"), Coral.log_TP1$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.04842 0.048424 3.1669 0.08175 .
Residuals 46 0.70338 0.015291
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check dispersion by Origin:Site
anova(betadisper(vegdist(Coral.log_TP1[,c(11:14, 16)], "euclidean"), Coral.log_TP1$Origin:Coral.log_TP1$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 3 0.02212 0.0073726 0.5649 0.641
Residuals 44 0.57425 0.0130512
Physiology differs significantly by Origin and the effect of Origin differs between Sites.
Calculate Effect Size of Origin for each Site
##KL
##PERMANOVA
Coral.TP1.perm_KL<-adonis2(vegdist(Coral.log_TP1[which(Coral.log_TP1$Site=="KL"),c(11:14, 16)], "euclidean")~ Coral.log_TP1$Origin[which(Coral.log_TP1$Site=="KL")], data=Coral.log_TP1[which(Coral.log_TP1$Site=="KL"),], strata=Coral.log_TP1$Genotype[which(Coral.log_TP1$Site=="KL")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP1.perm_KL)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP1[which(Coral.log_TP1$Site == "KL"), c(11:14, 16)], "euclidean") ~ Coral.log_TP1$Origin[which(Coral.log_TP1$Site == "KL")], data = Coral.log_TP1[which(Coral.log_TP1$Site == "KL"), ], method = "euclidean", strata = Coral.log_TP1$Genotype[which(Coral.log_TP1$Site == "KL")])
Df SumOfSqs F parOmegaSq
Coral.log_TP1$Origin[which(Coral.log_TP1$Site == "KL")] 1 0.05913 0.6453 -0.015001
Residual 22 2.01586
Total 23 2.07498
Pr(>F)
Coral.log_TP1$Origin[which(Coral.log_TP1$Site == "KL")] 0.437
Residual
Total
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP1[which(Coral.log_TP1$Site=="KL"),c(11:14, 16)], "euclidean"), Coral.log_TP1$Origin[which(Coral.log_TP1$Site=="KL")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.002019 0.0020194 0.1424 0.7095
Residuals 22 0.311986 0.0141812
##SS
##PERMANOVA
Coral.TP1.perm_SS<-adonis2(vegdist(Coral.log_TP1[which(Coral.log_TP1$Site=="SS"),c(11:14, 16)], "euclidean")~ Coral.log_TP1$Origin[which(Coral.log_TP1$Site=="SS")], data=Coral.log_TP1[which(Coral.log_TP1$Site=="SS"),], strata=Coral.log_TP1$Genotype[which(Coral.log_TP1$Site=="SS")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP1.perm_SS)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP1[which(Coral.log_TP1$Site == "SS"), c(11:14, 16)], "euclidean") ~ Coral.log_TP1$Origin[which(Coral.log_TP1$Site == "SS")], data = Coral.log_TP1[which(Coral.log_TP1$Site == "SS"), ], method = "euclidean", strata = Coral.log_TP1$Genotype[which(Coral.log_TP1$Site == "SS")])
Df SumOfSqs F parOmegaSq
Coral.log_TP1$Origin[which(Coral.log_TP1$Site == "SS")] 1 0.56298 4.9381 0.14096
Residual 22 2.50815
Total 23 3.07113
Pr(>F)
Coral.log_TP1$Origin[which(Coral.log_TP1$Site == "SS")] 0.001 ***
Residual
Total
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP1[which(Coral.log_TP1$Site=="SS"),c(11:14, 16)], "euclidean"), Coral.log_TP1$Origin[which(Coral.log_TP1$Site=="SS")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.000018 0.0000178 0.0015 0.9695
Residuals 22 0.262265 0.0119211
##Variance Partitioning
Coral.TP1.vp<-varpart(Coral.log_TP1[,c(11:14, 16)], Coral.log_TP1$Origin, Coral.log_TP1$Site, Coral.log_TP1$Genotype)
Coral.TP1.vp$part
No. of explanatory tables: 3
Total variation (SS): 5.5183
Variance: 0.11741
No. of observations: 48
Partition table:
---
Use function ‘rda’ to test significance of fractions of interest
##Check model significance
anova(rda(Coral.log_TP1[,c(11:14, 16)]~ Coral.log_TP1$Origin + Coral.log_TP1$Site + Coral.log_TP1$Genotype))
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 999
Model: rda(formula = Coral.log_TP1[, c(11:14, 16)] ~ Coral.log_TP1$Origin + Coral.log_TP1$Site + Coral.log_TP1$Genotype)
Df Variance F Pr(>F)
Model 4 0.047741 7.3665 0.001 ***
Residual 43 0.069669
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check variance explained by model
RsquareAdj(rda(Coral.log_TP1[,c(11:14, 16)]~ Coral.log_TP1$Origin + Coral.log_TP1$Site + Coral.log_TP1$Genotype))$adj.r.squared*100
[1] 35.1419
##Check effect of Origin
anova(rda(Coral.log_TP1[,c(11:14, 16)], Coral.log_TP1$Origin))
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 999
Model: rda(X = Coral.log_TP1[, c(11:14, 16)], Y = Coral.log_TP1$Origin)
Df Variance F Pr(>F)
Model 1 0.005933 2.4482 0.068 .
Residual 46 0.111477
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova(rda(Coral.log_TP1[,c(11:14, 16)], Coral.log_TP1$Origin, Coral.log_TP1[,c(4:5)]))
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 999
Model: rda(X = Coral.log_TP1[, c(11:14, 16)], Y = Coral.log_TP1$Origin, Z = Coral.log_TP1[, c(4:5)])
Df Variance F Pr(>F)
Model 1 0.005933 3.6619 0.014 *
Residual 43 0.069669
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check effect of Site
anova(rda(Coral.log_TP1[,c(11:14, 16)], Coral.log_TP1$Site))
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 999
Model: rda(X = Coral.log_TP1[, c(11:14, 16)], Y = Coral.log_TP1$Site)
Df Variance F Pr(>F)
Model 1 0.007918 3.3266 0.021 *
Residual 46 0.109492
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova(rda(Coral.log_TP1[,c(11:14, 16)], Coral.log_TP1$Site, Coral.log_TP1[,c(5,7)]))
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 999
Model: rda(X = Coral.log_TP1[, c(11:14, 16)], Y = Coral.log_TP1$Site, Z = Coral.log_TP1[, c(5, 7)])
Df Variance F Pr(>F)
Model 1 0.007918 4.8872 0.005 **
Residual 43 0.069669
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check effect of Genotype
anova(rda(Coral.log_TP1[,c(11:14, 16)], Coral.log_TP1$Genotype))
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 999
Model: rda(X = Coral.log_TP1[, c(11:14, 16)], Y = Coral.log_TP1$Genotype)
Df Variance F Pr(>F)
Model 2 0.03389 9.1297 0.001 ***
Residual 45 0.08352
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova(rda(Coral.log_TP1[,c(11:14, 16)], Coral.log_TP1$Genotype, Coral.log_TP1[,c(4,7)]))
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 999
Model: rda(X = Coral.log_TP1[, c(11:14, 16)], Y = Coral.log_TP1$Genotype, Z = Coral.log_TP1[, c(4, 7)])
Df Variance F Pr(>F)
Model 2 0.033890 10.458 0.001 ***
Residual 43 0.069669
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
The model is significant (p = 0.001) and explains 35.14% of the variance of physiology. The effect of Origin (controlling for Site and Genotype) is significant (p = 0.013) and explains 3.92%. The effect of Site (controlling for Origin and Genotype) is significant (p = 0.001) and explains 5.73%. The effect of Genotype (controlling for Origin and Site) is significant (p = 0.001) and explains 27.27%.
##Subset Timepoint 2
Coral.log_TP2<-subset(Coral.log, TimeP=="TP2")
##PERMANOVA
Coral.TP2.perm<-adonis2(vegdist(Coral.log_TP2[,c(11:14, 16)], "euclidean")~ Coral.log_TP2$Origin * Coral.log_TP2$Site, data=Coral.log_TP2, strata=Coral.log_TP2$Genotype, method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP2.perm)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP2[, c(11:14, 16)], "euclidean") ~ Coral.log_TP2$Origin * Coral.log_TP2$Site, data = Coral.log_TP2, method = "euclidean", strata = Coral.log_TP2$Genotype)
Df SumOfSqs F parOmegaSq Pr(>F)
Coral.log_TP2$Origin 1 0.0347 0.420 -0.01223 0.660
Coral.log_TP2$Site 1 2.0831 25.239 0.33554 0.001 ***
Coral.log_TP2$Origin:Coral.log_TP2$Site 1 0.2762 3.346 0.04660 0.050 *
Residual 44 3.6315
Total 47 6.0255
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP2[,c(11:14, 16)], "euclidean"), Coral.log_TP2$Origin))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.02892 0.028918 1.1826 0.2825
Residuals 46 1.12482 0.024453
##Check dispersion by Site
anova(betadisper(vegdist(Coral.log_TP2[,c(11:14, 16)], "euclidean"), Coral.log_TP2$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.00701 0.0070126 0.5917 0.4457
Residuals 46 0.54518 0.0118518
##Check dispersion by Origin:Site
anova(betadisper(vegdist(Coral.log_TP2[,c(11:14, 16)], "euclidean"), Coral.log_TP2$Origin:Coral.log_TP2$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 3 0.02003 0.0066763 0.6202 0.6057
Residuals 44 0.47364 0.0107645
Calculate Effect Size of Origin for each Site
##KL
##PERMANOVA
Coral.TP2.perm_KL<-adonis2(vegdist(Coral.log_TP2[which(Coral.log_TP2$Site=="KL"),c(11:14, 16)], "euclidean")~ Coral.log_TP2$Origin[which(Coral.log_TP2$Site=="KL")], data=Coral.log_TP2[which(Coral.log_TP2$Site=="KL"),], strata=Coral.log_TP2$Genotype[which(Coral.log_TP2$Site=="KL")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP2.perm_KL)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP2[which(Coral.log_TP2$Site == "KL"), c(11:14, 16)], "euclidean") ~ Coral.log_TP2$Origin[which(Coral.log_TP2$Site == "KL")], data = Coral.log_TP2[which(Coral.log_TP2$Site == "KL"), ], method = "euclidean", strata = Coral.log_TP2$Genotype[which(Coral.log_TP2$Site == "KL")])
Df SumOfSqs F parOmegaSq
Coral.log_TP2$Origin[which(Coral.log_TP2$Site == "KL")] 1 0.18146 2.5268 0.059813
Residual 22 1.57991
Total 23 1.76137
Pr(>F)
Coral.log_TP2$Origin[which(Coral.log_TP2$Site == "KL")] 0.045 *
Residual
Total
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP2[which(Coral.log_TP2$Site=="KL"),c(11:14, 16)], "euclidean"), Coral.log_TP2$Origin[which(Coral.log_TP2$Site=="KL")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.000732 0.0007320 0.0896 0.7675
Residuals 22 0.179698 0.0081681
##SS
##PERMANOVA
Coral.TP2.perm_SS<-adonis2(vegdist(Coral.log_TP2[which(Coral.log_TP2$Site=="SS"),c(11:14, 16)], "euclidean")~ Coral.log_TP2$Origin[which(Coral.log_TP2$Site=="SS")], data=Coral.log_TP2[which(Coral.log_TP2$Site=="SS"),], strata=Coral.log_TP2$Genotype[which(Coral.log_TP2$Site=="SS")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP2.perm_SS)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP2[which(Coral.log_TP2$Site == "SS"), c(11:14, 16)], "euclidean") ~ Coral.log_TP2$Origin[which(Coral.log_TP2$Site == "SS")], data = Coral.log_TP2[which(Coral.log_TP2$Site == "SS"), ], method = "euclidean", strata = Coral.log_TP2$Genotype[which(Coral.log_TP2$Site == "SS")])
Df SumOfSqs F parOmegaSq
Coral.log_TP2$Origin[which(Coral.log_TP2$Site == "SS")] 1 0.12937 1.3872 0.015878
Residual 22 2.05163
Total 23 2.18100
Pr(>F)
Coral.log_TP2$Origin[which(Coral.log_TP2$Site == "SS")] 0.166
Residual
Total
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP2[which(Coral.log_TP2$Site=="SS"),c(11:14, 16)], "euclidean"), Coral.log_TP2$Origin[which(Coral.log_TP2$Site=="SS")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.006276 0.0062764 0.4698 0.5003
Residuals 22 0.293942 0.0133610
##Subset Timepoint 3
Coral.log_TP3<-subset(Coral.log, TimeP=="TP3")
##PERMANOVA
Coral.TP3.perm<-adonis2(vegdist(Coral.log_TP3[,c(11:14, 16)], "euclidean")~ Coral.log_TP3$Origin * Coral.log_TP3$Site, data=Coral.log_TP3, strata=Coral.log_TP3$Genotype, method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP3.perm)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP3[, c(11:14, 16)], "euclidean") ~ Coral.log_TP3$Origin * Coral.log_TP3$Site, data = Coral.log_TP3, method = "euclidean", strata = Coral.log_TP3$Genotype)
Df SumOfSqs F parOmegaSq Pr(>F)
Coral.log_TP3$Origin 1 0.1051 0.7853 -0.004493 0.361
Coral.log_TP3$Site 1 1.4021 10.4738 0.164837 0.001 ***
Coral.log_TP3$Origin:Coral.log_TP3$Site 1 0.1024 0.7649 -0.004921 0.378
Residual 44 5.8901
Total 47 7.4997
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP3[,c(11:14, 16)], "euclidean"), Coral.log_TP3$Origin))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.06528 0.065278 2.0695 0.157
Residuals 46 1.45099 0.031543
##Check dispersion by Site
anova(betadisper(vegdist(Coral.log_TP3[,c(11:14, 16)], "euclidean"), Coral.log_TP3$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.00202 0.002024 0.0609 0.8062
Residuals 46 1.52934 0.033246
##Check dispersion by Origin:Site
anova(betadisper(vegdist(Coral.log_TP3[,c(11:14, 16)], "euclidean"), Coral.log_TP3$Origin:Coral.log_TP3$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 3 0.09225 0.030751 0.975 0.4131
Residuals 44 1.38769 0.031538
Calculate Effect Size of Origin for each Site
##KL
##PERMANOVA
Coral.TP3.perm_KL<-adonis2(vegdist(Coral.log_TP3[which(Coral.log_TP3$Site=="KL"),c(11:14, 16)], "euclidean")~ Coral.log_TP3$Origin[which(Coral.log_TP3$Site=="KL")], data=Coral.log_TP3[which(Coral.log_TP3$Site=="KL"),], strata=Coral.log_TP3$Genotype[which(Coral.log_TP3$Site=="KL")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP3.perm_KL)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP3[which(Coral.log_TP3$Site == "KL"), c(11:14, 16)], "euclidean") ~ Coral.log_TP3$Origin[which(Coral.log_TP3$Site == "KL")], data = Coral.log_TP3[which(Coral.log_TP3$Site == "KL"), ], method = "euclidean", strata = Coral.log_TP3$Genotype[which(Coral.log_TP3$Site == "KL")])
Df SumOfSqs F parOmegaSq
Coral.log_TP3$Origin[which(Coral.log_TP3$Site == "KL")] 1 0.17515 1.5145 0.020987
Residual 22 2.54431
Total 23 2.71946
Pr(>F)
Coral.log_TP3$Origin[which(Coral.log_TP3$Site == "KL")] 0.153
Residual
Total
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP3[which(Coral.log_TP3$Site=="KL"),c(11:14, 16)], "euclidean"), Coral.log_TP3$Origin[which(Coral.log_TP3$Site=="KL")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.00703 0.0070337 0.3193 0.5778
Residuals 22 0.48467 0.0220307
##SS
##PERMANOVA
Coral.TP3.perm_SS<-adonis2(vegdist(Coral.log_TP3[which(Coral.log_TP3$Site=="SS"),c(11:14, 16)], "euclidean")~ Coral.log_TP3$Origin[which(Coral.log_TP3$Site=="SS")], data=Coral.log_TP3[which(Coral.log_TP3$Site=="SS"),], strata=Coral.log_TP3$Genotype[which(Coral.log_TP3$Site=="SS")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP3.perm_SS)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP3[which(Coral.log_TP3$Site == "SS"), c(11:14, 16)], "euclidean") ~ Coral.log_TP3$Origin[which(Coral.log_TP3$Site == "SS")], data = Coral.log_TP3[which(Coral.log_TP3$Site == "SS"), ], method = "euclidean", strata = Coral.log_TP3$Genotype[which(Coral.log_TP3$Site == "SS")])
Df SumOfSqs F parOmegaSq
Coral.log_TP3$Origin[which(Coral.log_TP3$Site == "SS")] 1 0.0324 0.2129 -0.03391
Residual 22 3.3458
Total 23 3.3782
Pr(>F)
Coral.log_TP3$Origin[which(Coral.log_TP3$Site == "SS")] 0.772
Residual
Total
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP3[which(Coral.log_TP3$Site=="SS"),c(11:14, 16)], "euclidean"), Coral.log_TP3$Origin[which(Coral.log_TP3$Site=="SS")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.07949 0.079485 1.9365 0.178
Residuals 22 0.90301 0.041046
##Subset Timepoint 4
Coral.log_TP4<-subset(Coral.log, TimeP=="TP4")
##PERMANOVA
Coral.TP4.perm<-adonis2(vegdist(Coral.log_TP4[,c(11:14, 16)], "euclidean")~ Coral.log_TP4$Origin * Coral.log_TP4$Site, data=Coral.log_TP4, strata=Coral.log_TP4$Genotype, method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP4.perm)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP4[, c(11:14, 16)], "euclidean") ~ Coral.log_TP4$Origin * Coral.log_TP4$Site, data = Coral.log_TP4, method = "euclidean", strata = Coral.log_TP4$Genotype)
Df SumOfSqs F parOmegaSq Pr(>F)
Coral.log_TP4$Origin 1 0.0204 0.1301 -0.019276 0.921
Coral.log_TP4$Site 1 2.5446 16.2273 0.248701 0.001 ***
Coral.log_TP4$Origin:Coral.log_TP4$Site 1 0.2287 1.4586 0.009870 0.214
Residual 42 6.5861
Total 45 9.3799
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP4[,c(11:14, 16)], "euclidean"), Coral.log_TP4$Origin))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.00639 0.006388 0.1952 0.6608
Residuals 44 1.44022 0.032732
##Check dispersion by Site
anova(betadisper(vegdist(Coral.log_TP4[,c(11:14, 16)], "euclidean"), Coral.log_TP4$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.01153 0.011529 0.3704 0.5459
Residuals 44 1.36932 0.031121
##Check dispersion by Origin:Site
anova(betadisper(vegdist(Coral.log_TP4[,c(11:14, 16)], "euclidean"), Coral.log_TP4$Origin:Coral.log_TP4$Site))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 3 0.04203 0.014012 0.4161 0.7423
Residuals 42 1.41428 0.033673
Calculate Effect Size of Origin for each Site
##KL
##PERMANOVA
Coral.TP4.perm_KL<-adonis2(vegdist(Coral.log_TP4[which(Coral.log_TP4$Site=="KL"),c(11:14, 16)], "euclidean")~ Coral.log_TP4$Origin[which(Coral.log_TP4$Site=="KL")], data=Coral.log_TP4[which(Coral.log_TP4$Site=="KL"),], strata=Coral.log_TP4$Genotype[which(Coral.log_TP4$Site=="KL")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP4.perm_KL)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP4[which(Coral.log_TP4$Site == "KL"), c(11:14, 16)], "euclidean") ~ Coral.log_TP4$Origin[which(Coral.log_TP4$Site == "KL")], data = Coral.log_TP4[which(Coral.log_TP4$Site == "KL"), ], method = "euclidean", strata = Coral.log_TP4$Genotype[which(Coral.log_TP4$Site == "KL")])
Df SumOfSqs F parOmegaSq
Coral.log_TP4$Origin[which(Coral.log_TP4$Site == "KL")] 1 0.0676 0.3774 -0.027823
Residual 21 3.7601
Total 22 3.8277
Pr(>F)
Coral.log_TP4$Origin[which(Coral.log_TP4$Site == "KL")] 0.676
Residual
Total
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP4[which(Coral.log_TP4$Site=="KL"),c(11:14, 16)], "euclidean"), Coral.log_TP4$Origin[which(Coral.log_TP4$Site=="KL")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.00316 0.003160 0.0776 0.7833
Residuals 21 0.85503 0.040716
##SS
##PERMANOVA
Coral.TP4.perm_SS<-adonis2(vegdist(Coral.log_TP4[which(Coral.log_TP4$Site=="SS"),c(11:14, 16)], "euclidean")~ Coral.log_TP4$Origin[which(Coral.log_TP4$Site=="SS")], data=Coral.log_TP4[which(Coral.log_TP4$Site=="SS"),], strata=Coral.log_TP4$Genotype[which(Coral.log_TP4$Site=="SS")], method="euclidean")
##Effect Size
adonis_OmegaSq(Coral.TP4.perm_SS)
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Blocks: strata
Permutation: free
Number of permutations: 999
adonis2(formula = vegdist(Coral.log_TP4[which(Coral.log_TP4$Site == "SS"), c(11:14, 16)], "euclidean") ~ Coral.log_TP4$Origin[which(Coral.log_TP4$Site == "SS")], data = Coral.log_TP4[which(Coral.log_TP4$Site == "SS"), ], method = "euclidean", strata = Coral.log_TP4$Genotype[which(Coral.log_TP4$Site == "SS")])
Df SumOfSqs F parOmegaSq Pr(>F)
Coral.log_TP4$Origin[which(Coral.log_TP4$Site == "SS")] 1 0.18154 1.349 0.014948 0.149
Residual 21 2.82599
Total 22 3.00753
##Check dispersion by Origin
anova(betadisper(vegdist(Coral.log_TP4[which(Coral.log_TP4$Site=="SS"),c(11:14, 16)], "euclidean"), Coral.log_TP4$Origin[which(Coral.log_TP4$Site=="SS")]))
Analysis of Variance Table
Response: Distances
Df Sum Sq Mean Sq F value Pr(>F)
Groups 1 0.02157 0.021572 0.81 0.3783
Residuals 21 0.55925 0.026631
##Subset Timepoint 1
Coral.TP1<-subset(Coral.rm, TimeP=="TP1")
##Check normality
hist(Coral.TP1$TP_ug.cm2_C)
shapiro.test(Coral.TP1$TP_ug.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP1$TP_ug.cm2_C
W = 0.98637, p-value = 0.8448
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.C.lme_TP1<-lmer(TP_ug.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP1)
##Check residuals
Prot.C.lme_res_TP1 <- simulateResiduals(fittedModel = Prot.C.lme_TP1, plot = F)
plot(Prot.C.lme_res_TP1)
##Model results
summary(Prot.C.lme_TP1)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP1
REML criterion at convergence: 476.8
Scaled residuals:
Min 1Q Median 3Q Max
-1.98711 -0.58176 -0.00143 0.76130 1.61635
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 1703 41.27
Residual 2107 45.91
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 340.714 27.262 12.498
OriginTransplant 3.303 18.741 0.176
SiteSS 55.261 18.741 2.949
OriginTransplant:SiteSS -31.334 26.504 -1.182
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.344
SiteSS -0.344 0.500
OrgnTrn:SSS 0.243 -0.707 -0.707
eta_squared(Prot.C.lme_TP1)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.02 | [0.00, 1.00]
Site | 0.18 | [0.04, 1.00]
Origin:Site | 0.03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Check normality
hist(Coral.TP1$TP_ug.cm2_S)
shapiro.test(Coral.TP1$TP_ug.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP1$TP_ug.cm2_S
W = 0.96018, p-value = 0.1027
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.S.lme_TP1<-lmer(TP_ug.cm2_S~Origin*Site+(1|Genotype), data=Coral.TP1)
##Check residuals
Prot.S.lme_res_TP1 <- simulateResiduals(fittedModel = Prot.S.lme_TP1, plot = F)
plot(Prot.S.lme_res_TP1)
##Model results
summary(Prot.S.lme_TP1)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin * Site + (1 | Genotype)
Data: Coral.TP1
REML criterion at convergence: 504.7
Scaled residuals:
Min 1Q Median 3Q Max
-1.99771 -0.58981 -0.06134 0.48297 2.49136
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 1613 40.17
Residual 4087 63.93
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 459.014 29.638 15.488
OriginTransplant 1.258 26.100 0.048
SiteSS 42.145 26.100 1.615
OriginTransplant:SiteSS -86.531 36.910 -2.344
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.440
SiteSS -0.440 0.500
OrgnTrn:SSS 0.311 -0.707 -0.707
eta_squared(Prot.S.lme_TP1)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.11 | [0.01, 1.00]
Site | 8.78e-05 | [0.00, 1.00]
Origin:Site | 0.12 | [0.01, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Prot.S.lme_TP1_KL<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="KL"),])
summary(Prot.S.lme_TP1_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "KL"), ]
REML criterion at convergence: 254.6
Scaled residuals:
Min 1Q Median 3Q Max
-1.64984 -0.68376 -0.07079 0.30913 2.31492
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 2602 51.01
Residual 4223 64.99
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 459.014 34.918 13.145
OriginTransplant 1.258 26.531 0.047
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.380
eta_squared(Prot.S.lme_TP1_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 1.12e-04 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Prot.S.lme_TP1_SS<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="SS"),])
summary(Prot.S.lme_TP1_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "SS"), ]
REML criterion at convergence: 251.1
Scaled residuals:
Min 1Q Median 3Q Max
-1.7405 -0.5819 -0.2580 0.6750 2.1154
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 695.5 26.37
Residual 3899.6 62.45
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 501.16 23.60 21.239
OriginTransplant -85.27 25.49 -3.345
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.540
eta_squared(Prot.S.lme_TP1_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.36 | [0.10, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP1_ProtSym.sum<-summarySE(Coral.TP1, measurevar="TP_ug.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Protein across Treatments
TP1_ProtSym.plot<-ggplot(TP1_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Protein (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(350, 550)+
annotate("text", x=2, y=535, label="**", size=sig.sz, fontface="bold"); TP1_ProtSym.plot
##Check normality
hist(Coral.TP1$AFDW_mg.cm2_C)
shapiro.test(Coral.TP1$AFDW_mg.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP1$AFDW_mg.cm2_C
W = 0.96547, p-value = 0.1677
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.C.lme_TP1<-lmer(AFDW_mg.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP1)
##Check residuals
Bio.C.lme_res_TP1 <- simulateResiduals(fittedModel = Bio.C.lme_TP1, plot = F)
plot(Bio.C.lme_res_TP1)
##Model results
summary(Bio.C.lme_TP1)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP1
REML criterion at convergence: 17.9
Scaled residuals:
Min 1Q Median 3Q Max
-2.3616 -0.6323 0.1012 0.6827 1.4522
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.006352 0.0797
Residual 0.067274 0.2594
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.20320 0.08788 13.691
OriginTransplant -0.18538 0.10589 -1.751
SiteSS -0.01392 0.10589 -0.131
OriginTransplant:SiteSS 0.04772 0.14975 0.319
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.602
SiteSS -0.602 0.500
OrgnTrn:SSS 0.426 -0.707 -0.707
eta_squared(Bio.C.lme_TP1)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.10 | [0.00, 1.00]
Site | 4.20e-04 | [0.00, 1.00]
Origin:Site | 2.41e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.C.lme_TP1_KL<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="KL"),])
summary(Bio.C.lme_TP1_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "KL"), ]
REML criterion at convergence: 1.1
Scaled residuals:
Min 1Q Median 3Q Max
-1.61169 -0.43907 0.07185 0.60072 1.71208
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.003322 0.05764
Residual 0.047206 0.21727
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.2032 0.0710 16.95
OriginTransplant -0.1854 0.0887 -2.09
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.625
eta_squared(Bio.C.lme_TP1_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.18 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.C.lme_TP1_SS<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="SS"),])
summary(Bio.C.lme_TP1_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "SS"), ]
REML criterion at convergence: 15.4
Scaled residuals:
Min 1Q Median 3Q Max
-1.9881 -0.5903 0.3895 0.6868 1.3845
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.0002328 0.01526
Residual 0.0939949 0.30659
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.18928 0.08894 13.37
OriginTransplant -0.13767 0.12516 -1.10
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.704
eta_squared(Bio.C.lme_TP1_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.06 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP1_BioHost.sum<-summarySE(Coral.TP1, measurevar="AFDW_mg.cm2_C", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Host Biomass across Treatments
TP1_BioHost.plot<-ggplot(TP1_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Host Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 2)+
annotate("text", x=1, y=1.5, label="*", size=sig.sz, fontface="bold"); TP1_BioHost.plot
##Check normality
hist(Coral.TP1$AFDW_mg.cm2_S)
shapiro.test(Coral.TP1$AFDW_mg.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP1$AFDW_mg.cm2_S
W = 0.97584, p-value = 0.4194
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.S.lme_TP1<-lmer(AFDW_mg.cm2_S~Origin*Site+(1|Genotype), data=Coral.TP1)
##Check residuals
Bio.S.lme_res_TP1 <- simulateResiduals(fittedModel = Bio.S.lme_TP1, plot = F)
plot(Bio.S.lme_res_TP1)
##Model results
summary(Bio.S.lme_TP1)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin * Site + (1 | Genotype)
Data: Coral.TP1
REML criterion at convergence: -29.6
Scaled residuals:
Min 1Q Median 3Q Max
-1.71364 -0.74817 -0.06341 0.60227 2.13813
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.002785 0.05277
Residual 0.022713 0.15071
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.57323 0.05311 10.792
OriginTransplant 0.01058 0.06153 0.172
SiteSS 0.16334 0.06153 2.655
OriginTransplant:SiteSS -0.22488 0.08701 -2.584
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.579
SiteSS -0.579 0.500
OrgnTrn:SSS 0.410 -0.707 -0.707
eta_squared(Bio.S.lme_TP1)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.12 | [0.01, 1.00]
Site | 0.03 | [0.00, 1.00]
Origin:Site | 0.14 | [0.02, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.S.lme_TP1_KL<-lmer(AFDW_mg.cm2_S~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="KL"),])
summary(Bio.S.lme_TP1_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "KL"), ]
REML criterion at convergence: -21.1
Scaled residuals:
Min 1Q Median 3Q Max
-1.72868 -0.71431 0.04303 0.52737 1.90341
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.01040 0.1020
Residual 0.01508 0.1228
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.57323 0.06873 8.340
OriginTransplant 0.01058 0.05014 0.211
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.365
eta_squared(Bio.S.lme_TP1_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 2.22e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.S.lme_TP1_SS<-lmer(AFDW_mg.cm2_S~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="SS"),])
summary(Bio.S.lme_TP1_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "SS"), ]
REML criterion at convergence: -13.1
Scaled residuals:
Min 1Q Median 3Q Max
-1.2456 -0.7860 -0.1378 0.6402 2.1806
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.004289 0.06549
Residual 0.023707 0.15397
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.73657 0.05836 12.622
OriginTransplant -0.21429 0.06286 -3.409
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.539
eta_squared(Bio.S.lme_TP1_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.37 | [0.10, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP1_BioSym.sum<-summarySE(Coral.TP1, measurevar="AFDW_mg.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Biomass across Treatments
TP1_BioSym.plot<-ggplot(TP1_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 1)+
annotate("text", x=2, y=0.85, label="**", size=sig.sz, fontface="bold"); TP1_BioSym.plot
##Check normality
hist(Coral.TP1$Chl_ug.cm2)
shapiro.test(Coral.TP1$Chl_ug.cm2)
Shapiro-Wilk normality test
data: Coral.TP1$Chl_ug.cm2
W = 0.95564, p-value = 0.06727
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Chl.lme_TP1<-lmer(Chl_ug.cm2~Origin*Site+(1|Genotype), data=Coral.TP1)
##Check residuals
Chl.lme_res_TP1 <- simulateResiduals(fittedModel = Chl.lme_TP1, plot = F)
plot(Chl.lme_res_TP1)
##Model results
summary(Chl.lme_TP1)
Linear mixed model fit by REML ['lmerMod']
Formula: Chl_ug.cm2 ~ Origin * Site + (1 | Genotype)
Data: Coral.TP1
REML criterion at convergence: -0.4
Scaled residuals:
Min 1Q Median 3Q Max
-2.1377 -0.5871 -0.1548 0.6976 2.0162
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.08669 0.2944
Residual 0.03936 0.1984
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.86074 0.17937 4.799
OriginTransplant 0.07568 0.08099 0.934
SiteSS 0.54382 0.08099 6.715
OriginTransplant:SiteSS -0.48115 0.11454 -4.201
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.226
SiteSS -0.226 0.500
OrgnTrn:SSS 0.160 -0.707 -0.707
eta_squared(Chl.lme_TP1)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.16 | [0.03, 1.00]
Site | 0.40 | [0.21, 1.00]
Origin:Site | 0.30 | [0.12, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Chl.lme_TP1_KL<-lmer(Chl_ug.cm2~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="KL"),])
summary(Chl.lme_TP1_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: Chl_ug.cm2 ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "KL"), ]
REML criterion at convergence: -4.9
Scaled residuals:
Min 1Q Median 3Q Max
-1.42282 -0.68856 0.00126 0.53926 2.32168
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.05037 0.2244
Residual 0.02931 0.1712
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.86074 0.13868 6.207
OriginTransplant 0.07568 0.06989 1.083
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.252
eta_squared(Chl.lme_TP1_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.06 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Chl.lme_TP1_SS<-lmer(Chl_ug.cm2~Origin+(1|Genotype), data=Coral.TP1[which(Coral.TP1$Site=="SS"),])
summary(Chl.lme_TP1_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: Chl_ug.cm2 ~ Origin + (1 | Genotype)
Data: Coral.TP1[which(Coral.TP1$Site == "SS"), ]
REML criterion at convergence: 2.6
Scaled residuals:
Min 1Q Median 3Q Max
-2.0949 -0.5799 0.1160 0.6297 1.7750
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.13767 0.3710
Residual 0.03874 0.1968
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.40456 0.22163 6.338
OriginTransplant -0.40548 0.08035 -5.046
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.181
eta_squared(Chl.lme_TP1_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.56 | [0.30, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP1_Chl.sum<-summarySE(Coral.TP1, measurevar="Chl_ug.cm2", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Chlorophyll across Treatments
TP1_Chl.plot<-ggplot(TP1_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Total Chlorophyll (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(0, 2)+
annotate("text", x=2, y=1.7, label="***", size=sig.sz, fontface="bold"); TP1_Chl.plot
##Subset Timepoint 2
Coral.TP2<-subset(Coral.rm, TimeP=="TP2")
##Check normality
hist(Coral.TP2$TP_ug.cm2_C)
shapiro.test(Coral.TP2$TP_ug.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP2$TP_ug.cm2_C
W = 0.9796, p-value = 0.562
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.C.lme_TP2<-lmer(TP_ug.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP2)
##Check residuals
Prot.C.lme_res_TP2 <- simulateResiduals(fittedModel = Prot.C.lme_TP2, plot = F)
plot(Prot.C.lme_res_TP2)
##Model results
summary(Prot.C.lme_TP2)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP2
REML criterion at convergence: 469.4
Scaled residuals:
Min 1Q Median 3Q Max
-2.67310 -0.67673 -0.00324 0.57592 1.67096
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 391.9 19.80
Residual 1877.0 43.32
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 315.853 16.942 18.643
OriginTransplant -1.965 17.687 -0.111
SiteSS 42.263 17.687 2.389
OriginTransplant:SiteSS 8.579 25.013 0.343
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.522
SiteSS -0.522 0.500
OrgnTrn:SSS 0.369 -0.707 -0.707
eta_squared(Prot.C.lme_TP2)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 8.22e-04 | [0.00, 1.00]
Site | 0.25 | [0.08, 1.00]
Origin:Site | 2.79e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Check normality
hist(Coral.TP2$TP_ug.cm2_S)
shapiro.test(Coral.TP2$TP_ug.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP2$TP_ug.cm2_S
W = 0.95982, p-value = 0.09929
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.S.lme_TP2<-lmer(TP_ug.cm2_S~Origin*Site+(1|Genotype), data=Coral.TP2)
##Check residuals
Prot.S.lme_res_TP2 <- simulateResiduals(fittedModel = Prot.S.lme_TP2, plot = F)
plot(Prot.S.lme_res_TP2)
##Model results
summary(Prot.S.lme_TP2)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin * Site + (1 | Genotype)
Data: Coral.TP2
REML criterion at convergence: 493.1
Scaled residuals:
Min 1Q Median 3Q Max
-1.5114 -0.6809 -0.1247 0.6145 2.6570
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 796.1 28.22
Residual 3198.1 56.55
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 329.07 23.06 14.269
OriginTransplant -29.47 23.09 -1.277
SiteSS 43.25 23.09 1.873
OriginTransplant:SiteSS 35.17 32.65 1.077
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.501
SiteSS -0.501 0.500
OrgnTrn:SSS 0.354 -0.707 -0.707
eta_squared(Prot.S.lme_TP2)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.01 | [0.00, 1.00]
Site | 0.25 | [0.08, 1.00]
Origin:Site | 0.03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Prot.S.lme_TP2_KL<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="KL"),])
summary(Prot.S.lme_TP2_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "KL"), ]
REML criterion at convergence: 238.6
Scaled residuals:
Min 1Q Median 3Q Max
-1.4406 -0.8006 0.2111 0.5424 1.7322
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 688.7 26.24
Residual 2134.1 46.20
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 329.07 20.18 16.303
OriginTransplant -29.47 18.86 -1.563
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.467
eta_squared(Prot.S.lme_TP2_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.11 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Prot.S.lme_TP2_SS<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="SS"),])
summary(Prot.S.lme_TP2_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "SS"), ]
REML criterion at convergence: 251.8
Scaled residuals:
Min 1Q Median 3Q Max
-1.3034 -0.8616 0.0128 0.6244 2.1515
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 1484 38.53
Residual 3840 61.96
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 372.313 28.545 13.043
OriginTransplant 5.698 25.297 0.225
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.443
eta_squared(Prot.S.lme_TP2_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 2.53e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP2_ProtSym.sum<-summarySE(Coral.TP2, measurevar="TP_ug.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Protein across Treatments
TP2_ProtSym.plot<-ggplot(TP2_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Protein (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(250, 450); TP2_ProtSym.plot
##Check normality
hist(Coral.TP2$AFDW_mg.cm2_C)
shapiro.test(Coral.TP2$AFDW_mg.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP2$AFDW_mg.cm2_C
W = 0.98545, p-value = 0.8093
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.C.lme_TP2<-lmer(AFDW_mg.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP2)
##Check residuals
Bio.C.lme_res_TP2 <- simulateResiduals(fittedModel = Bio.C.lme_TP2, plot = F)
plot(Bio.C.lme_res_TP2)
##Model results
summary(Bio.C.lme_TP2)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP2
REML criterion at convergence: -19.7
Scaled residuals:
Min 1Q Median 3Q Max
-3.2645 -0.4732 -0.0846 0.5858 2.5448
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.002429 0.04928
Residual 0.028719 0.16947
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.16312 0.05659 20.552
OriginTransplant -0.10184 0.06918 -1.472
SiteSS -0.11111 0.06918 -1.606
OriginTransplant:SiteSS 0.26062 0.09784 2.664
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.611
SiteSS -0.611 0.500
OrgnTrn:SSS 0.432 -0.707 -0.707
eta_squared(Bio.C.lme_TP2)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 8.00e-03 | [0.00, 1.00]
Site | 3.65e-03 | [0.00, 1.00]
Origin:Site | 0.14 | [0.02, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.C.lme_TP2_KL<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="KL"),])
summary(Bio.C.lme_TP2_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "KL"), ]
REML criterion at convergence: -14.2
Scaled residuals:
Min 1Q Median 3Q Max
-1.7100 -0.5598 -0.2566 0.3597 2.9272
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.001355 0.03681
Residual 0.023645 0.15377
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.16312 0.04921 23.634
OriginTransplant -0.10184 0.06278 -1.622
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.638
eta_squared(Bio.C.lme_TP2_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.12 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.C.lme_TP2_SS<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="SS"),])
boundary (singular) fit: see help('isSingular')
summary(Bio.C.lme_TP2_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "SS"), ]
REML criterion at convergence: -5.5
Scaled residuals:
Min 1Q Median 3Q Max
-3.0676 -0.4964 0.1545 0.7280 1.2050
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.00000 0.0000
Residual 0.03634 0.1906
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.05201 0.05503 19.12
OriginTransplant 0.15878 0.07783 2.04
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.707
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
eta_squared(Bio.C.lme_TP2_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.16 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP2_BioHost.sum<-summarySE(Coral.TP2, measurevar="AFDW_mg.cm2_C", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Host Biomass across Treatments
TP2_BioHost.plot<-ggplot(TP2_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Host Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 2)+
annotate("text", x=2, y=1.35, label="-", size=levels.sz, fontface="bold"); TP2_BioHost.plot
##Check normality
hist(Coral.TP2$AFDW_mg.cm2_S)
shapiro.test(Coral.TP2$AFDW_mg.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP2$AFDW_mg.cm2_S
W = 0.98263, p-value = 0.6911
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.S.lme_TP2<-lmer(AFDW_mg.cm2_S~Origin*Site+(1|Genotype), data=Coral.TP2)
##Check residuals
Bio.S.lme_res_TP2 <- simulateResiduals(fittedModel = Bio.S.lme_TP2, plot = F)
plot(Bio.S.lme_res_TP2)
##Model results
summary(Bio.S.lme_TP2)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin * Site + (1 | Genotype)
Data: Coral.TP2
REML criterion at convergence: -50.2
Scaled residuals:
Min 1Q Median 3Q Max
-1.89274 -0.61267 -0.05248 0.62439 1.64962
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.0003874 0.01968
Residual 0.0146825 0.12117
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.71562 0.03678 19.457
OriginTransplant -0.12045 0.04947 -2.435
SiteSS 0.12854 0.04947 2.599
OriginTransplant:SiteSS 0.11020 0.06996 1.575
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.673
SiteSS -0.673 0.500
OrgnTrn:SSS 0.476 -0.707 -0.707
eta_squared(Bio.S.lme_TP2)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.08 | [0.00, 1.00]
Site | 0.40 | [0.21, 1.00]
Origin:Site | 0.06 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.S.lme_TP2_KL<-lmer(AFDW_mg.cm2_S~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="KL"),])
boundary (singular) fit: see help('isSingular')
summary(Bio.S.lme_TP2_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "KL"), ]
REML criterion at convergence: -25.2
Scaled residuals:
Min 1Q Median 3Q Max
-1.7872 -0.5807 -0.0580 0.6095 1.5698
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.00000 0.0000
Residual 0.01486 0.1219
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.71562 0.03519 20.34
OriginTransplant -0.12045 0.04977 -2.42
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.707
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
eta_squared(Bio.S.lme_TP2_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.21 | [0.02, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.S.lme_TP2_SS<-lmer(AFDW_mg.cm2_S~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="SS"),])
summary(Bio.S.lme_TP2_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "SS"), ]
REML criterion at convergence: -27.9
Scaled residuals:
Min 1Q Median 3Q Max
-1.7098 -0.5388 -0.1840 0.6014 1.8524
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.004978 0.07056
Residual 0.011447 0.10699
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.84416 0.05112 16.513
OriginTransplant -0.01025 0.04368 -0.235
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.427
eta_squared(Bio.S.lme_TP2_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 2.74e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP2_BioSym.sum<-summarySE(Coral.TP2, measurevar="AFDW_mg.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Biomass across Treatments
TP2_BioSym.plot<-ggplot(TP2_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 1)+
annotate("text", x=1, y=0.85, label="*", size=sig.sz, fontface="bold"); TP2_BioSym.plot
##Check normality
hist(Coral.TP2$Chl_ug.cm2)
shapiro.test(Coral.TP2$Chl_ug.cm2)
Shapiro-Wilk normality test
data: Coral.TP2$Chl_ug.cm2
W = 0.89322, p-value = 0.0003826
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Chl.lme_TP2<-lmer(Chl_ug.cm2~Origin*Site+(1|Genotype), data=Coral.TP2)
##Check residuals
Chl.lme_res_TP2 <- simulateResiduals(fittedModel = Chl.lme_TP2, plot = F)
plot(Chl.lme_res_TP2)
##Model results
summary(Chl.lme_TP2)
Linear mixed model fit by REML ['lmerMod']
Formula: Chl_ug.cm2 ~ Origin * Site + (1 | Genotype)
Data: Coral.TP2
REML criterion at convergence: 60.1
Scaled residuals:
Min 1Q Median 3Q Max
-1.5646 -0.6834 -0.2260 0.6331 2.9227
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.02999 0.1732
Residual 0.17246 0.4153
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.2824 0.1561 8.216
OriginTransplant -0.2475 0.1695 -1.460
SiteSS 0.5567 0.1695 3.284
OriginTransplant:SiteSS 0.6593 0.2398 2.750
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.543
SiteSS -0.543 0.500
OrgnTrn:SSS 0.384 -0.707 -0.707
eta_squared(Chl.lme_TP2)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.01 | [0.00, 1.00]
Site | 0.57 | [0.40, 1.00]
Origin:Site | 0.15 | [0.02, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Chl.lme_TP2_KL<-lmer(Chl_ug.cm2~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="KL"),])
summary(Chl.lme_TP2_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: Chl_ug.cm2 ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "KL"), ]
REML criterion at convergence: 4.9
Scaled residuals:
Min 1Q Median 3Q Max
-1.4118 -0.7633 -0.1784 0.6717 2.0082
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.01088 0.1043
Residual 0.05353 0.2314
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.28244 0.08993 14.26
OriginTransplant -0.24748 0.09445 -2.62
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.525
eta_squared(Chl.lme_TP2_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.26 | [0.03, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Chl.lme_TP2_SS<-lmer(Chl_ug.cm2~Origin+(1|Genotype), data=Coral.TP2[which(Coral.TP2$Site=="SS"),])
summary(Chl.lme_TP2_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: Chl_ug.cm2 ~ Origin + (1 | Genotype)
Data: Coral.TP2[which(Coral.TP2$Site == "SS"), ]
REML criterion at convergence: 36.7
Scaled residuals:
Min 1Q Median 3Q Max
-1.2515 -0.7498 -0.1994 0.6152 2.0640
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.1653 0.4065
Residual 0.2069 0.4548
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.8391 0.2689 6.838
OriginTransplant 0.4118 0.1857 2.218
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.345
eta_squared(Chl.lme_TP2_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.20 | [0.01, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP2_Chl.sum<-summarySE(Coral.TP2, measurevar="Chl_ug.cm2", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Chlorophyll across Treatments
TP2_Chl.plot<-ggplot(TP2_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Total Chlorophyll (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(0, 2.5)+
annotate("text", x=c(1,2), y=c(1.5, 2.5), label="*", size=sig.sz, fontface="bold"); TP2_Chl.plot
##Subset Timepoint 3
Coral.TP3<-subset(Coral.rm, TimeP=="TP3")
##Check normality
hist(Coral.TP3$TP_ug.cm2_C)
shapiro.test(Coral.TP3$TP_ug.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP3$TP_ug.cm2_C
W = 0.97395, p-value = 0.3582
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.C.lme_TP3<-lmer(TP_ug.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP3)
##Check residuals
Prot.C.lme_res_TP3 <- simulateResiduals(fittedModel = Prot.C.lme_TP3, plot = F)
plot(Prot.C.lme_res_TP3)
##Model results
summary(Prot.C.lme_TP3)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP3
REML criterion at convergence: 507.3
Scaled residuals:
Min 1Q Median 3Q Max
-2.52281 -0.56107 -0.09932 0.69343 2.85970
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 1765 42.01
Residual 4332 65.82
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 354.577 30.812 11.508
OriginTransplant -28.338 26.869 -1.055
SiteSS 11.510 26.869 0.428
OriginTransplant:SiteSS 6.695 37.999 0.176
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.436
SiteSS -0.436 0.500
OrgnTrn:SSS 0.308 -0.707 -0.707
eta_squared(Prot.C.lme_TP3)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.04 | [0.00, 1.00]
Site | 0.01 | [0.00, 1.00]
Origin:Site | 7.38e-04 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Check normality
hist(Coral.TP3$TP_ug.cm2_S)
shapiro.test(Coral.TP3$TP_ug.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP3$TP_ug.cm2_S
W = 0.95992, p-value = 0.1002
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.S.lme_TP3<-lmer(TP_ug.cm2_S~Origin*Site+(1|Genotype), data=Coral.TP3)
##Check residuals
Prot.S.lme_res_TP3 <- simulateResiduals(fittedModel = Prot.S.lme_TP3, plot = F)
plot(Prot.S.lme_res_TP3)
##Model results
summary(Prot.S.lme_TP3)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin * Site + (1 | Genotype)
Data: Coral.TP3
REML criterion at convergence: 497.6
Scaled residuals:
Min 1Q Median 3Q Max
-2.04853 -0.63564 -0.04301 0.40723 2.41329
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 606.5 24.63
Residual 3588.9 59.91
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 350.04 22.39 15.635
OriginTransplant -31.07 24.46 -1.270
SiteSS 54.24 24.46 2.218
OriginTransplant:SiteSS 40.43 34.59 1.169
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.546
SiteSS -0.546 0.500
OrgnTrn:SSS 0.386 -0.707 -0.707
eta_squared(Prot.S.lme_TP3)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 9.30e-03 | [0.00, 1.00]
Site | 0.31 | [0.13, 1.00]
Origin:Site | 0.03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Prot.S.lme_TP3_KL<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="KL"),])
summary(Prot.S.lme_TP3_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "KL"), ]
REML criterion at convergence: 240.3
Scaled residuals:
Min 1Q Median 3Q Max
-1.73973 -0.61677 -0.06905 0.34373 2.28780
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 267.5 16.36
Residual 2444.8 49.45
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 350.04 17.11 20.453
OriginTransplant -31.07 20.19 -1.539
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.590
eta_squared(Prot.S.lme_TP3_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.11 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Prot.S.lme_TP3_SS<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="SS"),])
summary(Prot.S.lme_TP3_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "SS"), ]
REML criterion at convergence: 255.5
Scaled residuals:
Min 1Q Median 3Q Max
-1.80428 -0.53697 0.01298 0.48663 2.22260
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 939.7 30.66
Residual 4737.1 68.83
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 404.272 26.608 15.193
OriginTransplant 9.355 28.098 0.333
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.528
eta_squared(Prot.S.lme_TP3_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 5.51e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP3_ProtSym.sum<-summarySE(Coral.TP3, measurevar="TP_ug.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Protein across Treatments
TP3_ProtSym.plot<-ggplot(TP3_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Protein (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(250, 450); TP3_ProtSym.plot
##Check normality
hist(Coral.TP3$AFDW_mg.cm2_C)
shapiro.test(Coral.TP3$AFDW_mg.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP3$AFDW_mg.cm2_C
W = 0.98042, p-value = 0.5962
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.C.lme_TP3<-lmer(AFDW_mg.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP3)
##Check residuals
Bio.C.lme_res_TP3 <- simulateResiduals(fittedModel = Bio.C.lme_TP3, plot = F)
plot(Bio.C.lme_res_TP3)
##Model results
summary(Bio.C.lme_TP3)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP3
REML criterion at convergence: 1.8
Scaled residuals:
Min 1Q Median 3Q Max
-2.39331 -0.54299 0.06699 0.61611 2.15929
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.007168 0.08467
Residual 0.045972 0.21441
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.18826 0.07887 15.066
OriginTransplant -0.12291 0.08753 -1.404
SiteSS 0.09539 0.08753 1.090
OriginTransplant:SiteSS 0.12089 0.12379 0.977
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.555
SiteSS -0.555 0.500
OrgnTrn:SSS 0.392 -0.707 -0.707
eta_squared(Bio.C.lme_TP3)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.02 | [0.00, 1.00]
Site | 0.13 | [0.01, 1.00]
Origin:Site | 0.02 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.C.lme_TP3_KL<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="KL"),])
summary(Bio.C.lme_TP3_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "KL"), ]
REML criterion at convergence: 4.6
Scaled residuals:
Min 1Q Median 3Q Max
-2.11835 -0.65919 -0.03638 0.66514 2.01105
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.002671 0.05168
Residual 0.055878 0.23638
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.18826 0.07448 15.955
OriginTransplant -0.12291 0.09650 -1.274
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.648
eta_squared(Bio.C.lme_TP3_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.08 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.C.lme_TP3_SS<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="SS"),])
summary(Bio.C.lme_TP3_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "SS"), ]
REML criterion at convergence: -1.9
Scaled residuals:
Min 1Q Median 3Q Max
-1.92899 -0.46522 0.05763 0.57468 2.06374
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.006692 0.0818
Residual 0.039684 0.1992
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.283651 0.074415 17.250
OriginTransplant -0.002024 0.081326 -0.025
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.546
eta_squared(Bio.C.lme_TP3_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 3.10e-05 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP3_BioHost.sum<-summarySE(Coral.TP3, measurevar="AFDW_mg.cm2_C", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Host Biomass across Treatments
TP3_BioHost.plot<-ggplot(TP3_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Host Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 2); TP3_BioHost.plot
##Check normality
hist(Coral.TP3$AFDW_mg.cm2_S)
shapiro.test(Coral.TP3$AFDW_mg.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP3$AFDW_mg.cm2_S
W = 0.95017, p-value = 0.04062
#Slightly non Normal
hist(log(Coral.TP3$AFDW_mg.cm2_S+1))
shapiro.test(log(Coral.TP3$AFDW_mg.cm2_S+1))
Shapiro-Wilk normality test
data: log(Coral.TP3$AFDW_mg.cm2_S + 1)
W = 0.97082, p-value = 0.2726
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.S.lme_TP3<-lmer(log(AFDW_mg.cm2_S+1)~Origin*Site+(1|Genotype), data=Coral.TP3)
##Check residuals
Bio.S.lme_res_TP3 <- simulateResiduals(fittedModel = Bio.S.lme_TP3, plot = F)
plot(Bio.S.lme_res_TP3)
##Model results
summary(Bio.S.lme_TP3)
Linear mixed model fit by REML ['lmerMod']
Formula: log(AFDW_mg.cm2_S + 1) ~ Origin * Site + (1 | Genotype)
Data: Coral.TP3
REML criterion at convergence: -59.8
Scaled residuals:
Min 1Q Median 3Q Max
-1.9013 -0.6371 -0.1087 0.6759 2.0985
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.001717 0.04143
Residual 0.011351 0.10654
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.50341 0.03896 12.920
OriginTransplant -0.02185 0.04349 -0.502
SiteSS 0.07684 0.04349 1.767
OriginTransplant:SiteSS 0.04053 0.06151 0.659
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.558
SiteSS -0.558 0.500
OrgnTrn:SSS 0.395 -0.707 -0.707
eta_squared(Bio.S.lme_TP3)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 6.34e-05 | [0.00, 1.00]
Site | 0.19 | [0.04, 1.00]
Origin:Site | 0.01 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.S.lme_TP3_KL<-lmer(log(AFDW_mg.cm2_S+1)~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="KL"),])
summary(Bio.S.lme_TP3_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: log(AFDW_mg.cm2_S + 1) ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "KL"), ]
REML criterion at convergence: -32.8
Scaled residuals:
Min 1Q Median 3Q Max
-2.19334 -0.63480 -0.09404 0.31252 2.01340
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.001809 0.04253
Residual 0.009689 0.09843
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.50341 0.03755 13.405
OriginTransplant -0.02185 0.04018 -0.544
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.535
eta_squared(Bio.S.lme_TP3_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.01 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.S.lme_TP3_SS<-lmer(log(AFDW_mg.cm2_S+1)~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="SS"),])
summary(Bio.S.lme_TP3_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: log(AFDW_mg.cm2_S + 1) ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "SS"), ]
REML criterion at convergence: -26.4
Scaled residuals:
Min 1Q Median 3Q Max
-1.70864 -0.59241 -0.00109 0.59598 2.08623
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.0008163 0.02857
Residual 0.0136003 0.11662
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.58025 0.03749 15.478
OriginTransplant 0.01868 0.04761 0.392
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.635
eta_squared(Bio.S.lme_TP3_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 7.63e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP3_BioSym.sum<-summarySE(Coral.TP3, measurevar="AFDW_mg.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Biomass across Treatments
TP3_BioSym.plot<-ggplot(TP3_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 1); TP3_BioSym.plot
##Check normality
hist(Coral.TP3$Chl_ug.cm2)
shapiro.test(Coral.TP3$Chl_ug.cm2)
Shapiro-Wilk normality test
data: Coral.TP3$Chl_ug.cm2
W = 0.92502, p-value = 0.004491
#Not normal
hist(log(Coral.TP3$Chl_ug.cm2+1))
shapiro.test(log(Coral.TP3$Chl_ug.cm2+1))
Shapiro-Wilk normality test
data: log(Coral.TP3$Chl_ug.cm2 + 1)
W = 0.97477, p-value = 0.3837
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Chl.lme_TP3<-lmer(log(Chl_ug.cm2+1)~Origin*Site+(1|Genotype), data=Coral.TP3)
##Check residuals
Chl.lme_res_TP3 <- simulateResiduals(fittedModel = Chl.lme_TP3, plot = F)
plot(Chl.lme_res_TP3)
##Model results
summary(Chl.lme_TP3)
Linear mixed model fit by REML ['lmerMod']
Formula: log(Chl_ug.cm2 + 1) ~ Origin * Site + (1 | Genotype)
Data: Coral.TP3
REML criterion at convergence: -35.4
Scaled residuals:
Min 1Q Median 3Q Max
-2.25062 -0.55117 -0.02076 0.43420 2.75244
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.01951 0.1397
Residual 0.01831 0.1353
Number of obs: 48, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.81996 0.08960 9.151
OriginTransplant -0.10476 0.05525 -1.896
SiteSS 0.18045 0.05525 3.266
OriginTransplant:SiteSS 0.13664 0.07813 1.749
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.308
SiteSS -0.308 0.500
OrgnTrn:SSS 0.218 -0.707 -0.707
eta_squared(Chl.lme_TP3)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 0.02 | [0.00, 1.00]
Site | 0.49 | [0.31, 1.00]
Origin:Site | 0.07 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Chl.lme_TP3_KL<-lmer(log(Chl_ug.cm2+1)~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="KL"),])
summary(Chl.lme_TP3_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: log(Chl_ug.cm2 + 1) ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "KL"), ]
REML criterion at convergence: -19
Scaled residuals:
Min 1Q Median 3Q Max
-1.7968 -0.6704 -0.2815 0.8139 2.1670
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.009698 0.09848
Residual 0.016854 0.12982
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.8200 0.0681 12.041
OriginTransplant -0.1048 0.0530 -1.977
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.389
eta_squared(Chl.lme_TP3_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.16 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Chl.lme_TP3_SS<-lmer(log(Chl_ug.cm2+1)~Origin+(1|Genotype), data=Coral.TP3[which(Coral.TP3$Site=="SS"),])
summary(Chl.lme_TP3_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: log(Chl_ug.cm2 + 1) ~ Origin + (1 | Genotype)
Data: Coral.TP3[which(Coral.TP3$Site == "SS"), ]
REML criterion at convergence: -16.6
Scaled residuals:
Min 1Q Median 3Q Max
-2.11066 -0.45318 -0.01187 0.63929 2.41481
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.03310 0.1819
Residual 0.01702 0.1305
Number of obs: 24, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.00040 0.11159 8.965
OriginTransplant 0.03189 0.05326 0.599
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.239
eta_squared(Chl.lme_TP3_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.02 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP3_Chl.sum<-summarySE(Coral.TP3, measurevar="Chl_ug.cm2", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Chlorophyll across Treatments
TP3_Chl.plot<-ggplot(TP3_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Total Chlorophyll (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(0, 2.5)+
annotate("text", x=1, y=1.7, label="-", size=levels.sz, fontface="bold"); TP3_Chl.plot
##Subset Timepoint 4
Coral.TP4<-subset(Coral.rm, TimeP=="TP4")
##Check normality
hist(Coral.TP4$TP_ug.cm2_C)
shapiro.test(Coral.TP4$TP_ug.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP4$TP_ug.cm2_C
W = 0.97592, p-value = 0.4503
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.C.lme_TP4<-lmer(TP_ug.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP4)
##Check residuals
Prot.C.lme_res_TP4 <- simulateResiduals(fittedModel = Prot.C.lme_TP4, plot = F)
plot(Prot.C.lme_res_TP4)
##Model results
summary(Prot.C.lme_TP4)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP4
REML criterion at convergence: 492.6
Scaled residuals:
Min 1Q Median 3Q Max
-1.82648 -0.74846 0.02454 0.66400 1.93010
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 23.74 4.872
Residual 5739.32 75.758
Number of obs: 46, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 329.20 22.05 14.930
OriginTransplant 21.29 31.63 0.673
SiteSS 50.44 30.93 1.631
OriginTransplant:SiteSS -67.31 44.72 -1.505
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.686
SiteSS -0.701 0.489
OrgnTrn:SSS 0.485 -0.707 -0.692
eta_squared(Prot.C.lme_TP4)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 7.51e-03 | [0.00, 1.00]
Site | 0.01 | [0.00, 1.00]
Origin:Site | 0.05 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Check normality
hist(Coral.TP4$TP_ug.cm2_S)
shapiro.test(Coral.TP4$TP_ug.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP4$TP_ug.cm2_S
W = 0.98874, p-value = 0.9316
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Prot.S.lme_TP4<-lmer(TP_ug.cm2_S~Origin*Site+(1|Genotype), data=Coral.TP4)
##Check residuals
Prot.S.lme_res_TP4 <- simulateResiduals(fittedModel = Prot.S.lme_TP4, plot = F)
plot(Prot.S.lme_res_TP4)
##Model results
summary(Prot.S.lme_TP4)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin * Site + (1 | Genotype)
Data: Coral.TP4
REML criterion at convergence: 464
Scaled residuals:
Min 1Q Median 3Q Max
-1.9674 -0.6915 -0.1394 0.7468 1.8746
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 258.6 16.08
Residual 2793.9 52.86
Number of obs: 46, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 283.146 17.862 15.852
OriginTransplant 2.715 22.078 0.123
SiteSS 94.191 21.579 4.365
OriginTransplant:SiteSS -14.298 31.203 -0.458
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.590
SiteSS -0.604 0.489
OrgnTrn:SSS 0.418 -0.707 -0.692
eta_squared(Prot.S.lme_TP4)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 2.00e-03 | [0.00, 1.00]
Site | 0.44 | [0.25, 1.00]
Origin:Site | 5.22e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Prot.S.lme_TP4_KL<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="KL"),])
summary(Prot.S.lme_TP4_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "KL"), ]
REML criterion at convergence: 233.2
Scaled residuals:
Min 1Q Median 3Q Max
-1.9026 -0.5130 -0.1508 0.5988 1.9630
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 123.5 11.11
Residual 3004.0 54.81
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 283.146 17.074 16.584
OriginTransplant 2.801 22.890 0.122
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.641
eta_squared(Prot.S.lme_TP4_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 7.84e-04 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Prot.S.lme_TP4_SS<-lmer(TP_ug.cm2_S~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="SS"),])
summary(Prot.S.lme_TP4_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: TP_ug.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "SS"), ]
REML criterion at convergence: 231.3
Scaled residuals:
Min 1Q Median 3Q Max
-1.95275 -0.71834 -0.03221 0.77696 1.62897
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 300.3 17.33
Residual 2653.9 51.52
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 377.34 17.92 21.05
OriginTransplant -10.98 21.53 -0.51
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.573
eta_squared(Prot.S.lme_TP4_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.01 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP4_ProtSym.sum<-summarySE(Coral.TP4, measurevar="TP_ug.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Protein across Treatments
TP4_ProtSym.plot<-ggplot(TP4_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Protein (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(250, 450); TP4_ProtSym.plot
##Check normality
hist(Coral.TP4$AFDW_mg.cm2_C)
shapiro.test(Coral.TP4$AFDW_mg.cm2_C)
Shapiro-Wilk normality test
data: Coral.TP4$AFDW_mg.cm2_C
W = 0.98656, p-value = 0.8669
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.C.lme_TP4<-lmer(AFDW_mg.cm2_C~Origin*Site+(1|Genotype), data=Coral.TP4)
##Check residuals
Bio.C.lme_res_TP4 <- simulateResiduals(fittedModel = Bio.C.lme_TP4, plot = F)
plot(Bio.C.lme_res_TP4)
##Model results
summary(Bio.C.lme_TP4)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin * Site + (1 | Genotype)
Data: Coral.TP4
REML criterion at convergence: 31.4
Scaled residuals:
Min 1Q Median 3Q Max
-1.94819 -0.65333 0.01107 0.59003 2.21357
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.0006586 0.02566
Residual 0.0974518 0.31217
Number of obs: 46, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.99501 0.09133 10.895
OriginTransplant 0.17260 0.13032 1.324
SiteSS 0.33916 0.12744 2.661
OriginTransplant:SiteSS -0.38438 0.18428 -2.086
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.682
SiteSS -0.698 0.489
OrgnTrn:SSS 0.483 -0.707 -0.692
eta_squared(Bio.C.lme_TP4)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 1.12e-03 | [0.00, 1.00]
Site | 0.06 | [0.00, 1.00]
Origin:Site | 0.10 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.C.lme_TP4_KL<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="KL"),])
boundary (singular) fit: see help('isSingular')
summary(Bio.C.lme_TP4_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "KL"), ]
REML criterion at convergence: 22.6
Scaled residuals:
Min 1Q Median 3Q Max
-1.65092 -0.56347 0.01929 0.47522 1.89563
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.0000 0.0000
Residual 0.1361 0.3689
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.9950 0.1065 9.344
OriginTransplant 0.1727 0.1540 1.121
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.692
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
eta_squared(Bio.C.lme_TP4_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.06 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.C.lme_TP4_SS<-lmer(AFDW_mg.cm2_C~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="SS"),])
summary(Bio.C.lme_TP4_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_C ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "SS"), ]
REML criterion at convergence: 4.4
Scaled residuals:
Min 1Q Median 3Q Max
-1.2767 -0.7007 0.1653 0.5506 2.0180
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.009792 0.09895
Residual 0.052524 0.22918
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.33417 0.08741 15.263
OriginTransplant -0.20931 0.09578 -2.185
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.523
eta_squared(Bio.C.lme_TP4_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.20 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP4_BioHost.sum<-summarySE(Coral.TP4, measurevar="AFDW_mg.cm2_C", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Host Biomass across Treatments
TP4_BioHost.plot<-ggplot(TP4_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Host Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 2)+
annotate("text", x=2, y=1.6, label="*", size=sig.sz, fontface="bold"); TP4_BioHost.plot
##Check normality
hist(Coral.TP4$AFDW_mg.cm2_S)
shapiro.test(Coral.TP4$AFDW_mg.cm2_S)
Shapiro-Wilk normality test
data: Coral.TP4$AFDW_mg.cm2_S
W = 0.96144, p-value = 0.1304
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Bio.S.lme_TP4<-lmer(AFDW_mg.cm2_S~Origin*Site+(1|Genotype), data=Coral.TP4)
boundary (singular) fit: see help('isSingular')
##Check residuals
Bio.S.lme_res_TP4 <- simulateResiduals(fittedModel = Bio.S.lme_TP4, plot = F)
plot(Bio.S.lme_res_TP4)
##Model results
summary(Bio.S.lme_TP4)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin * Site + (1 | Genotype)
Data: Coral.TP4
REML criterion at convergence: -13.3
Scaled residuals:
Min 1Q Median 3Q Max
-1.9850 -0.7648 -0.1116 0.6976 1.8287
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.00000 0.0000
Residual 0.03381 0.1839
Number of obs: 46, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.58851 0.05308 11.087
OriginTransplant 0.02029 0.07675 0.264
SiteSS 0.15893 0.07507 2.117
OriginTransplant:SiteSS -0.05653 0.10855 -0.521
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.692
SiteSS -0.707 0.489
OrgnTrn:SSS 0.489 -0.707 -0.692
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
eta_squared(Bio.S.lme_TP4)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 5.14e-04 | [0.00, 1.00]
Site | 0.12 | [0.01, 1.00]
Origin:Site | 6.42e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Bio.S.lme_TP4_KL<-lmer(AFDW_mg.cm2_S~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="KL"),])
boundary (singular) fit: see help('isSingular')
summary(Bio.S.lme_TP4_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "KL"), ]
REML criterion at convergence: -9
Scaled residuals:
Min 1Q Median 3Q Max
-1.8536 -0.7454 -0.2379 0.7005 1.9338
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.00000 0.0000
Residual 0.03023 0.1739
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.58851 0.05019 11.72
OriginTransplant 0.02029 0.07258 0.28
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.692
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
eta_squared(Bio.S.lme_TP4_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 3.71e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Bio.S.lme_TP4_SS<-lmer(AFDW_mg.cm2_S~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="SS"),])
boundary (singular) fit: see help('isSingular')
summary(Bio.S.lme_TP4_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: AFDW_mg.cm2_S ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "SS"), ]
REML criterion at convergence: -4.5
Scaled residuals:
Min 1Q Median 3Q Max
-1.8877 -0.8214 0.1483 0.7055 1.5821
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.00000 0.0000
Residual 0.03739 0.1934
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.74744 0.05582 13.391
OriginTransplant -0.03625 0.08071 -0.449
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.692
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
eta_squared(Bio.S.lme_TP4_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 9.51e-03 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP4_BioSym.sum<-summarySE(Coral.TP4, measurevar="AFDW_mg.cm2_S", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Symbiont Biomass across Treatments
TP4_BioSym.plot<-ggplot(TP4_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Symbiont Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0, 1); TP4_BioSym.plot
##Check normality
hist(Coral.TP4$Chl_ug.cm2)
shapiro.test(Coral.TP4$Chl_ug.cm2)
Shapiro-Wilk normality test
data: Coral.TP4$Chl_ug.cm2
W = 0.94799, p-value = 0.03927
#Slightly non normal
hist(log(Coral.TP4$Chl_ug.cm2+1))
shapiro.test(log(Coral.TP4$Chl_ug.cm2+1))
Shapiro-Wilk normality test
data: log(Coral.TP4$Chl_ug.cm2 + 1)
W = 0.97457, p-value = 0.4047
#Normal
##Model
#Function of Site and Origin, with Genotype as a Random effect
#Interactions between Origin and Site
Chl.lme_TP4<-lmer(log(Chl_ug.cm2+1)~Origin*Site+(1|Genotype), data=Coral.TP4)
##Check residuals
Chl.lme_res_TP4 <- simulateResiduals(fittedModel = Chl.lme_TP4, plot = F)
plot(Chl.lme_res_TP4)
##Model results
summary(Chl.lme_TP4)
Linear mixed model fit by REML ['lmerMod']
Formula: log(Chl_ug.cm2 + 1) ~ Origin * Site + (1 | Genotype)
Data: Coral.TP4
REML criterion at convergence: -35.8
Scaled residuals:
Min 1Q Median 3Q Max
-2.5527 -0.6247 0.1083 0.5659 1.8596
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.02813 0.1677
Residual 0.01693 0.1301
Number of obs: 46, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.939828 0.103867 9.048
OriginTransplant -0.005543 0.054370 -0.102
SiteSS 0.335684 0.053119 6.319
OriginTransplant:SiteSS 0.049977 0.076810 0.651
Correlation of Fixed Effects:
(Intr) OrgnTr SiteSS
OrgnTrnspln -0.250
SiteSS -0.256 0.489
OrgnTrn:SSS 0.177 -0.706 -0.692
eta_squared(Chl.lme_TP4)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-------------------------------------------
Origin | 6.34e-03 | [0.00, 1.00]
Site | 0.69 | [0.55, 1.00]
Origin:Site | 0.01 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
Effect size of Origin for each Site
##KL
Chl.lme_TP4_KL<-lmer(log(Chl_ug.cm2+1)~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="KL"),])
summary(Chl.lme_TP4_KL)
Linear mixed model fit by REML ['lmerMod']
Formula: log(Chl_ug.cm2 + 1) ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "KL"), ]
REML criterion at convergence: -14
Scaled residuals:
Min 1Q Median 3Q Max
-1.59344 -0.58861 -0.05038 0.48137 1.88220
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.01194 0.1093
Residual 0.02028 0.1424
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.939828 0.075300 12.481
OriginTransplant -0.005243 0.059554 -0.088
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.377
eta_squared(Chl.lme_TP4_KL)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 4.07e-04 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##SS
Chl.lme_TP4_SS<-lmer(log(Chl_ug.cm2+1)~Origin+(1|Genotype), data=Coral.TP4[which(Coral.TP4$Site=="SS"),])
summary(Chl.lme_TP4_SS)
Linear mixed model fit by REML ['lmerMod']
Formula: log(Chl_ug.cm2 + 1) ~ Origin + (1 | Genotype)
Data: Coral.TP4[which(Coral.TP4$Site == "SS"), ]
REML criterion at convergence: -25
Scaled residuals:
Min 1Q Median 3Q Max
-2.80744 -0.47238 0.03677 0.58308 1.31155
Random effects:
Groups Name Variance Std.Dev.
Genotype (Intercept) 0.049098 0.22158
Residual 0.009964 0.09982
Number of obs: 23, groups: Genotype, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.27551 0.13113 9.727
OriginTransplant 0.04346 0.04175 1.041
Correlation of Fixed Effects:
(Intr)
OrgnTrnspln -0.152
eta_squared(Chl.lme_TP4_SS)
# Effect Size for ANOVA (Type III)
Parameter | Eta2 (partial) | 95% CI
-----------------------------------------
Origin | 0.05 | [0.00, 1.00]
- One-sided CIs: upper bound fixed at [1.00].
##Summary statistics by Site and Origin
TP4_Chl.sum<-summarySE(Coral.TP4, measurevar="Chl_ug.cm2", groupvars=c("Site", "Origin", "Site.Orig"), na.rm=TRUE)
##Plot Average Chlorophyll across Treatments
TP4_Chl.plot<-ggplot(TP4_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site and Origin", y=expression(paste('Total Chlorophyll (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(0, 3.5); TP4_Chl.plot
##Dataframe of effect size results
Phys.ES<-data.frame(TimeP=c(rep("TP1",8), rep("TP2",8), rep("TP3",8), rep("TP4",8)),
Site=c(rep(c("KL", "SS"),16)),
Metric=c(rep(c("AFDW_mg.cm2_C", "AFDW_mg.cm2_C", "AFDW_mg.cm2_S", "AFDW_mg.cm2_S", "TP_ug.cm2_S", "TP_ug.cm2_S", "Chl_ug.cm2", "Chl_ug.cm2"),4)),
EtaSq=c(eta_squared(Bio.C.lme_TP1_KL)$Eta2_partial,
eta_squared(Bio.C.lme_TP1_SS)$Eta2_partial,
eta_squared(Bio.S.lme_TP1_KL)$Eta2_partial,
eta_squared(Bio.S.lme_TP1_SS)$Eta2_partial,
eta_squared(Prot.S.lme_TP1_KL)$Eta2_partial,
eta_squared(Prot.S.lme_TP1_SS)$Eta2_partial,
eta_squared(Chl.lme_TP1_KL)$Eta2_partial,
eta_squared(Chl.lme_TP1_SS)$Eta2_partial,
eta_squared(Bio.C.lme_TP2_KL)$Eta2_partial,
eta_squared(Bio.C.lme_TP2_SS)$Eta2_partial,
eta_squared(Bio.S.lme_TP2_KL)$Eta2_partial,
eta_squared(Bio.S.lme_TP2_SS)$Eta2_partial,
eta_squared(Prot.S.lme_TP2_KL)$Eta2_partial,
eta_squared(Prot.S.lme_TP2_SS)$Eta2_partial,
eta_squared(Chl.lme_TP2_KL)$Eta2_partial,
eta_squared(Chl.lme_TP2_SS)$Eta2_partial,
eta_squared(Bio.C.lme_TP3_KL)$Eta2_partial,
eta_squared(Bio.C.lme_TP3_SS)$Eta2_partial,
eta_squared(Bio.S.lme_TP3_KL)$Eta2_partial,
eta_squared(Bio.S.lme_TP3_SS)$Eta2_partial,
eta_squared(Prot.S.lme_TP3_KL)$Eta2_partial,
eta_squared(Prot.S.lme_TP3_SS)$Eta2_partial,
eta_squared(Chl.lme_TP3_KL)$Eta2_partial,
eta_squared(Chl.lme_TP3_SS)$Eta2_partial,
eta_squared(Bio.C.lme_TP4_KL)$Eta2_partial,
eta_squared(Bio.C.lme_TP4_SS)$Eta2_partial,
eta_squared(Bio.S.lme_TP4_KL)$Eta2_partial,
eta_squared(Bio.S.lme_TP4_SS)$Eta2_partial,
eta_squared(Prot.S.lme_TP4_KL)$Eta2_partial,
eta_squared(Prot.S.lme_TP4_SS)$Eta2_partial,
eta_squared(Chl.lme_TP4_KL)$Eta2_partial,
eta_squared(Chl.lme_TP4_SS)$Eta2_partial),
Pvalue=c(summary(Bio.C.lme_TP1_KL)$coefficients[10],
summary(Bio.C.lme_TP1_SS)$coefficients[10],
summary(Bio.S.lme_TP1_KL)$coefficients[10],
summary(Bio.S.lme_TP1_SS)$coefficients[10],
summary(Prot.S.lme_TP1_KL)$coefficients[10],
summary(Prot.S.lme_TP1_SS)$coefficients[10],
summary(Chl.lme_TP1_KL)$coefficients[10],
summary(Chl.lme_TP1_SS)$coefficients[10],
summary(Bio.C.lme_TP2_KL)$coefficients[10],
summary(Bio.C.lme_TP2_SS)$coefficients[10],
summary(Bio.S.lme_TP2_KL)$coefficients[10],
summary(Bio.S.lme_TP2_SS)$coefficients[10],
summary(Prot.S.lme_TP2_KL)$coefficients[10],
summary(Prot.S.lme_TP2_SS)$coefficients[10],
summary(Chl.lme_TP2_KL)$coefficients[10],
summary(Chl.lme_TP2_SS)$coefficients[10],
summary(Bio.C.lme_TP3_KL)$coefficients[10],
summary(Bio.C.lme_TP3_SS)$coefficients[10],
summary(Bio.S.lme_TP3_KL)$coefficients[10],
summary(Bio.S.lme_TP3_SS)$coefficients[10],
summary(Prot.S.lme_TP3_KL)$coefficients[10],
summary(Prot.S.lme_TP3_SS)$coefficients[10],
summary(Chl.lme_TP3_KL)$coefficients[10],
summary(Chl.lme_TP3_SS)$coefficients[10],
summary(Bio.C.lme_TP4_KL)$coefficients[10],
summary(Bio.C.lme_TP4_SS)$coefficients[10],
summary(Bio.S.lme_TP4_KL)$coefficients[10],
summary(Bio.S.lme_TP4_SS)$coefficients[10],
summary(Prot.S.lme_TP4_KL)$coefficients[10],
summary(Prot.S.lme_TP4_SS)$coefficients[10],
summary(Chl.lme_TP4_KL)$coefficients[10],
summary(Chl.lme_TP4_SS)$coefficients[10]))
Phys.ES$Sig<-ifelse(Phys.ES$Pvalue<0.001, "***", ifelse(Phys.ES$Pvalue<0.01, "**", ifelse(Phys.ES$Pvalue<0.05, "*", ifelse(Phys.ES$Pvalue<0.1, "-", NA))))
Bio.C.ES.plot<-ggplot(Phys.ES[which(Phys.ES$Metric=="AFDW_mg.cm2_C"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Host Biomass")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Time Point", y=expression(paste("Effect Size (p", eta^2, ")")), colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold"); Bio.C.ES.plot
Bio.S.ES.plot<-ggplot(Phys.ES[which(Phys.ES$Metric=="AFDW_mg.cm2_S"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Symbiont Biomass")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Time Point", y=expression(paste("Effect Size (p", eta^2, ")")), colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold"); Bio.S.ES.plot
Prot.S.ES.plot<-ggplot(Phys.ES[which(Phys.ES$Metric=="TP_ug.cm2_S"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Symbiont Protein")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Time Point", y=expression(paste("Effect Size (p", eta^2, ")")), colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold"); Prot.S.ES.plot
Chl.ES.plot<-ggplot(Phys.ES[which(Phys.ES$Metric=="Chl_ug.cm2"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Chlorophyll")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Time Point", y=expression(paste("Effect Size (p", eta^2, ")")), colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold"); Chl.ES.plot
##Host Biomass
Bio.C.ES.plot.cut<-ggplot(Phys.ES[which(Phys.ES$Metric=="AFDW_mg.cm2_C"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Host Biomass")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"), legend.position=c(0.15, 0.8))+
labs(x="", y=expression(paste("Effect Size (p", eta^2, ")")), colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold")
##Symbiont Biomass
Bio.S.ES.plot.cut<-ggplot(Phys.ES[which(Phys.ES$Metric=="AFDW_mg.cm2_S"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Symbiont Biomass")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.position="none")+
labs(x="", y="", colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold")
##Symbiont Protein
Prot.S.ES.plot.cut<-ggplot(Phys.ES[which(Phys.ES$Metric=="TP_ug.cm2_S"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Symbiont Protein")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.position="none")+
labs(x="Time Point", y=expression(paste("Effect Size (p", eta^2, ")")), colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold")
##Chlorophyll
Chl.ES.plot.cut<-ggplot(Phys.ES[which(Phys.ES$Metric=="Chl_ug.cm2"),], aes(x=TimeP, y=EtaSq, fill=Site))+
geom_bar(stat="identity", position=position_dodge())+
scale_fill_manual(values=Site.colors.o)+
theme_classic()+
ggtitle("Chlorophyll")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, hjust=0.5), axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"), legend.position="none")+
labs(x="Time Point", y="", colour="Site")+
ylim(0, 0.6)+
geom_text(aes(label=Sig), vjust=-0.02, color="black", position=position_dodge(0.9), size=levels.sz, fontface="bold")
##Create Panel
PhysES_fig<-plot_grid(Bio.C.ES.plot.cut, Bio.S.ES.plot.cut,
Prot.S.ES.plot.cut, Chl.ES.plot.cut,
rel_widths=c(0.9, 1, 0.9, 1),
rel_heights = c(1, 1, 1, 1),
nrow=2, ncol=2, byrow=T, labels = c("A", "B", "C", "D"))
Warning: Removed 8 rows containing missing values (`geom_text()`).Warning: Removed 8 rows containing missing values (`geom_text()`).Warning: Removed 8 rows containing missing values (`geom_text()`).Warning: Removed 8 rows containing missing values (`geom_text()`).
##Save Figure
ggsave(filename="Figures/02_Physiology/Fig2_PhysiologyEffectSizes.png", plot=PhysES_fig, dpi=300, width=10, height=8, units="in")
##Biomass Host
TP1_BioHost.plot.cut<-ggplot(TP1_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
ggtitle("TP1")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, face="bold", hjust=0.5),
axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y=expression(paste('Host Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0.75, 1.5)+
annotate("text", x=1, y=1.35, label="*", size=levels.sz, fontface="bold")
TP2_BioHost.plot.cut<-ggplot(TP2_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
ggtitle("TP2")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, face="bold", hjust=0.5),
axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y="", colour="Origin")+
ylim(0.75, 1.5)+
annotate("text", x=2, y=1.35, label="-", size=levels.sz, fontface="bold")
TP3_BioHost.plot.cut<-ggplot(TP3_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
ggtitle("TP3")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, face="bold", hjust=0.5),
axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y="", colour="Origin")+
ylim(0.75, 1.5)
TP4_BioHost.plot.cut<-ggplot(TP4_BioHost.sum, aes(x=Site, y=AFDW_mg.cm2_C, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_C-se, ymax=AFDW_mg.cm2_C+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
ggtitle("TP4")+
theme(plot.title = element_text(colour="black", size=panel.lab.sz, face="bold", hjust=0.5),
axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="", y="", colour="Origin")+
ylim(0.75, 1.5)+
annotate("text", x=2, y=1.45, label="*", size=levels.sz, fontface="bold")
##Biomass Symbiont
TP1_BioSym.plot.cut<-ggplot(TP1_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y=expression(paste('Symbiont Biomass (mg cm'^-2*")")), colour="Origin")+
ylim(0.45, 0.95)+
annotate("text", x=2, y=0.82, label="**", size=levels.sz, fontface="bold")
TP2_BioSym.plot.cut<-ggplot(TP2_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y="", colour="Origin")+
ylim(0.45, 0.95)+
annotate("text", x=1, y=0.82, label="*", size=levels.sz, fontface="bold")
TP3_BioSym.plot.cut<-ggplot(TP3_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y="", colour="Origin")+
ylim(0.45, 0.95)
TP4_BioSym.plot.cut<-ggplot(TP4_BioSym.sum, aes(x=Site, y=AFDW_mg.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=AFDW_mg.cm2_S-se, ymax=AFDW_mg.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="", y="", colour="Origin")+
ylim(0.45, 0.95)
##Protein Symbiont
TP1_ProtSym.plot.cut<-ggplot(TP1_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y=expression(paste('Symbiont Protein (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(250, 550)+
annotate("text", x=2, y=535, label="**", size=levels.sz, fontface="bold")
TP2_ProtSym.plot.cut<-ggplot(TP2_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y="", colour="Origin")+
ylim(250, 550)
TP3_ProtSym.plot.cut<-ggplot(TP3_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="", y="", colour="Origin")+
ylim(250, 550)
TP4_ProtSym.plot.cut<-ggplot(TP4_ProtSym.sum, aes(x=Site, y=TP_ug.cm2_S, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=TP_ug.cm2_S-se, ymax=TP_ug.cm2_S+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="", y="", colour="Origin")+
ylim(250, 550)
##Chlorophyll
TP1_Chl.plot.cut<-ggplot(TP1_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="Site", y=expression(paste('Total Chlorophyll (\u03BCg cm'^-2*")")), colour="Origin")+
ylim(0.5, 3.25)+
annotate("text", x=2, y=1.7, label="***", size=levels.sz, fontface="bold")
TP2_Chl.plot.cut<-ggplot(TP2_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="Site", y="", colour="Origin")+
ylim(0.5, 3.25)+
annotate("text", x=c(1,2), y=c(1.7, 2.6), label="*", size=levels.sz, fontface="bold")
TP3_Chl.plot.cut<-ggplot(TP3_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.position="none")+
labs(x="Site", y="", colour="Origin")+
ylim(0.5, 3.25)+
annotate("text", x=1, y=1.7, label="-", size=levels.sz, fontface="bold")
TP4_Chl.plot.cut<-ggplot(TP4_Chl.sum, aes(x=Site, y=Chl_ug.cm2, colour=Site.Orig)) +
scale_colour_manual(values=Orig.colors.o)+
geom_errorbar(aes(ymin=Chl_ug.cm2-se, ymax=Chl_ug.cm2+se), width=cap.sz, linewidth=bar.sz, position=position_dodge(width=0.5)) +
geom_point(size=point.sz, position=position_dodge(width=0.5))+
theme_classic()+
theme(axis.title.x = element_text(size = axis.title.sz), axis.title.y = element_text(size = axis.title.sz),
axis.text.x=element_text(size=axis.txt.sz, colour="black"), axis.text.y=element_text(size=axis.txt.sz, colour="black"),
legend.text=element_text(size=leg.txt.sz), legend.title=element_text(size=leg.title.sz),
legend.box.background = element_rect(color = "black"))+
labs(x="Site", y="", colour="Origin")+
ylim(0.5, 3.25)
##Create Panel
Phys_fig<-plot_grid(
TP1_BioHost.plot.cut,TP2_BioHost.plot.cut,TP3_BioHost.plot.cut,TP4_BioHost.plot.cut,
TP1_BioSym.plot.cut,TP2_BioSym.plot.cut,TP3_BioSym.plot.cut,TP4_BioSym.plot.cut,
TP1_ProtSym.plot.cut,TP2_ProtSym.plot.cut,TP3_ProtSym.plot.cut,TP4_ProtSym.plot.cut,
TP1_Chl.plot.cut,TP2_Chl.plot.cut,TP3_Chl.plot.cut,TP4_Chl.plot.cut,
rel_widths=c(rep(c(0.75, 0.75, 0.75,1),4)),
rel_heights = c(1,0.85,0.85,0.85),
nrow=4, ncol=4, byrow=T, labels = NULL)
##Save Figure
ggsave(filename="Figures/02_Physiology/FigS3_PhysiologyMetrics.png", plot=Phys_fig, dpi=300, width=12, height=14, units="in")